package com.deyuanyun.pic.ae.controller.vo;

import com.deyuanyun.pic.common.util.DateUtil;
import com.deyuanyun.pic.common.util.format.DateFormat;
import org.apache.log4j.LogManager;
import org.apache.log4j.Logger;

import java.util.Date;

/**
 * Created by linwei on 11/10/2016.
 */
public class AEBaseVO<T> extends DefaultCommand<T> {

    protected Logger logger = LogManager.getLogger(this.getClass());

    // 主键
    private String id;
    // 记录人
    private String recorder;
    // 记录时间
    private String recordTime;
    // 备注
    private String remarks;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getRecorder() {
        return recorder;
    }

    public void setRecorder(String recorder) {
        this.recorder = recorder;
    }

    public String getRecordTime() {
        return recordTime;
    }

    public void setRecordTime(String recordTime) {
        this.recordTime = recordTime;
    }

    public String getRemarks() {
        return remarks;
    }

    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }

    public void fromDomain(String id, String recorder, Date recordTime, String remarks) {
        // 主键
        this.id = id;
        // 记录人
        this.recorder = recorder;
        // 记录时间
        this.recordTime = DateFormat.format(recordTime);
        // 备注
        this.remarks = remarks;
    }

    public static void main(String[] agrs){
        System.out.print(new Date("2016-11-28"));
    }
}
